<?php

require_once('Adept/Filter/IFilter.php');

class Adept_Filter_Processing implements Adept_Filter_IFilter
{

    public function process($chain)
    {

        $request = Adept_Context::getInstance()->getRequest();
        $controllerClass = $request->getController();
        if (!$controllerClass) {
            throw new Adept_Exception("Controller not defined");
        }
        $controller = new $controllerClass();
        $controller->process();

        $chain->next();
    }

}
